Problem: Find the integer $n$, $4 \le n \le 8$, such that \[n \equiv 7882 \pmod{5}.\]
We see that $7882 \equiv 2 \pmod{5}$.  The only integer $n$ such that $4 \le n \le 8$ and $n \equiv 2 \pmod{5}$ is $n = \boxed{7}$.